import instance from '@/utils/request'

// 获取-部门列表
export const getDepartmentListApi = () => {
  return instance.get('/company/department')
}

// 获取部门负责人的数据
export const getManagerListApi = () => {
  return instance.get('/sys/user/simple')
}

// 新增部门
export const addDepartmentApi = (data) => {
  return instance.post('/company/department', data)
}

// 获取部门详情
export const getDepartmentDetailApi = (id) => {
  return instance.get(`/company/department/${id}`)
}

// 修改-部门详情
export const updateDepartmentDetailApi = (data) => {
  return instance.put(`/company/department/${data.id}`, data)
}

// 删除部门
export const deleteDepartmentApi = (id) => {
  return instance.delete(`/company/department/${id}`)
}
